#include <thread>
#include <iterator>
#include <iostream>
#include "Viewer/SimpleDrawer.h"
#include "Viewer/ViewerReader.h"


int main( int /*argc*/, char** /*argv*/ )
{  
    Viewer::ViewerReader viewReader("../Iteration");
    viewReader.readAllFiles();
    Viewer::SimpleDrawer simpleDrawer;
    // simpleDrawer.Run();
    // std::copy(viewReader.mvFileNames_.begin(), viewReader.mvFileNames_.end(), std::ostream_iterator<std::string>(std::cout, "\n"));
    //std::copy(viewReader.mvPoseVariables_.begin(), viewReader.mvPoseVariables_.end(), std::ostream_iterator<std::array<double,12>>(std::cout, "\n"));
    std::cout << viewReader.mvvPoseVariables_.size() << std::endl;
    simpleDrawer.SetAllPoses(viewReader.mvvPoseVariables_);

    std::thread* pthread = new std::thread(&Viewer::SimpleDrawer::Run, &simpleDrawer);
    pthread->join();
    return 0;
}